<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<button>点击1</button><br/>
		<button class="ok">点击2</button>
		
		<script src="../js/jquery-2.1.4.js" type="text/javascript" charset="utf-8"></script>
		
		<script type="text/javascript">
			/* window.onload = function() {
				var btn = document.getElementsByTagName("button")[0];
				btn.onclick = function () {
					console.log("click");
				}
			} */
			
			// 和window.onload一样都是页面加载完了之后执行
			/* $(document).ready(function(){
				console.log("ready");
			}); */
			
			$(function() {
				console.log("ready...");
				$("button").click(function() {
					console.log("click...")
				});
				
				$(".ok");
			});
			
		</script>
	</body>
</html>
